package com.songshuang.nomina.controller;

import com.songshuang.nomina.service.BabyNamingService;
import com.songshuang.nomina.vo.BabyInfoVO;
import com.songshuang.nomina.vo.BabyNameResVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 宝宝取名
 */
@RestController
public class BabyNamingController {
    @Autowired
    private BabyNamingService babyNamingService;


    /**
     * 功能：简单方式生成宝宝名字
     * @param babyInfoVO 宝宝信息
     * @return 宝宝名字
     */
    @PostMapping("/traditionNaming")
    public List<BabyNameResVO> traditionNaming(@RequestBody BabyInfoVO babyInfoVO) {
        List<BabyNameResVO> babyNameResVOList = babyNamingService.traditionNaming(babyInfoVO);
        return babyNameResVOList;
    }

    @GetMapping("/hello")
    public String aiNaming() {
        return "hello world!";
    }

    public String generateAINames() {
        return "Songshuang";
    }
}
